package cn.zhouyang.redistest.push;

import org.reactivestreams.Publisher;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * @Author:ZhouYang
 * @Description:
 * @Date: Created in 2021/3/23 9:10
 * @Modified By：
 */
public class TestMessage {
    public static void main(String[] args) {

        JedisPool jedisPool = new JedisPool(new JedisPoolConfig(),"115.159.122.54",6379);
        System.out.println(String.format("redis pool is starting, redis ip %s, redis port %d", "127.0.0.1", 6379));
        SubThread subThread = new SubThread(jedisPool);  //订阅者
        subThread.start();
        SubThread2 subThread2 = new SubThread2(jedisPool);  //订阅者
        subThread2.start();
        PushAndSub publisher = new PushAndSub(jedisPool);    //发布者
        publisher.start();

    }
}
